fix seg-fault in refint

fix seg-fault in refint

Edit