Fix up command logic