Add type to command serialization