fix minor invalid reference bug