Mageworx_XSitemap incompatibility fix

Resolves incompatibility with mageworx_xsitemap, also resolves a bug in the last commit.