fixed mouse handling issue