insert photo page template bug fix