Fix for Sitecore 6.6 and 7