correcting a few equality comparisons and adding a fix for invoices and shipto ids