fix deleting last node