added some protection to line items