add ensureElement flag call in render for afterRender