Handling Error and Missing Pairs  BugFix