Updated onRender procedure.