Fix joystick code