moved clearing joystick state from closing to initializing joysticks