correcting bug, was duplicating references.