fix issue of ref/value