fixing a bug with image