fix a command switch judge