Fix bug with command prevention