fixed NULL pointer in cmd_unregister && fixed crash in QServer.c