fix mouse problems (thanks Castler!)