fixed a bug that was caused when there was only 1 line item