minor fixes and gamepad support improvement