Better version to support reloading elements.