cost: fix issue #325
Merge pull request #331 from martinpovolny/max_price

cost: fix issue #325