Fixed command handling