adjust the command registering order