Add debug in the delete function to understand why it is not working.