Fix bug in deleter