fixing #14 and #11; tags pop correctly and nested anchors work