Fix command processing