fixeingline_item iteration in event that line_item is a hash instead of array