fixed bug in unpaid case