render_function fixes