Fixed bug happening with some images.