fixed reference issue in adj/vis functions