changes on handler.render_str and handler.render