Fixed bug in mouse wheel code