Clean up the denyCommands logic.