Fix small bug when image is nil