fix error in render_correct_template