correctly handle custom types
up version