Fixed a null pointer exception for the joystick