Fixed render_template implementation to avoid initializing a param default with a reference