Fixed flag issue in command system