I managed to fix the issue with the anchors by applying the trick from this post (thanks to @tkhquang for that)