Fixed small bug when creating a new image