Bug with image deletion fixed