fix use delete atomic function