Do this correctly in afterRender.