Minor fix for deleting handles