fix deleting error bug