fixed command equality to take type into consideration.