fixed reference bug