ref() problem fixed