corrected bug where clicking an element inside of an anchor was not correctly handled by handleAnchor