fix not ref problem