change render_template correctly