Setting module before calling to util.refine_type