fixed command serialization bug