Fixed bug in payout calculation logic.