Fix NaN error
Merge pull request #141 from andig/auto-hide-costs

Fix NaN error