fix when loadElements is called