Fix crash when configuring joystick