fixed a mouse related bug