Fix old image deletion