Added afterRender callback