The callbacks used to receive the HTML events were not removed if the joystick subsystem initialization failed or if the joystick subsystem was quit. Also, the already connected joysticks were not deleted if the initialization failed later.