fixed a bug with the x key and mouse movement