Fixing a bug with images