fixed image deletion issue