fixing base urls in templates