Fixed a crash in cases Item do not have anchors.

Deleted other pull request as i couldn't get the squash right. Created this one with just one commit.