Fixed bug with variable not being handled with keypress and mouse wheel.