When custom data types are used, objects do not receive correct type name