Changed order in if clause in CommandHandler