Fix bug in removeImageSizes()