Implemented pre-render event.