Fix bug when select a lot of images.