Fix loading of multiple dom elements