Fixing bug with not loading all the images automatically