Fixed render_template issue