Unwanted modification of WP_Widget_Recent_Posts

Hi,

I have added this function to a website I am working on:

add_filter('posts_orderby', 'gloss_alphabetical' );
function gloss_alphabetical( $orderby ){

if ( is_home() || is_front_page()) {
return $orderby;
} else {
return "post_date ASC";
}
}

It does its job, however, the WP_Widget_Recent_Posts function is also effected by the code, which means that the latest post widget in the sidebar shows the oldest post now.

How can I exclude the sidebar so filter doesn’t have an effect on the widgets in the sidebar, in my function?

Sincerely,

Mika