Fixed error in doCommand