Fix reference bug issue