Fixed bug removing elements from the images array.