added limits for mouse cursor