Fixed several command handler errors.