Fixed crashing bug in mouse