iAdded and fixed the command error validation