Attempting to load gallery when 5th image has been loaded, instead of waiting for the last.