fixing bugs in primitive converters