Added an afterRender callback