url fixes for templates