fixing custom templates on forbidden pages