Fix anchor origin calculation
Merge pull request #1819 from oterral/fix_anchor

Fix anchor origin calculation