Fixed image count and bad images