add ensureElement flag for afterRender