Waiting for iamges to load before adding them