Fixing a small bug with image viewer