Fix reftype conversion in compact