set delete after the callback has been call