fix a reference error in some occurances