fixed auto delete issue