Errors in in graph calculations

This is the version for 2.1 branch corresponding to https://github.com/pfsense/pfsense/commit/f9983a874d6acf5fcf08a08606a6d19624af4438
Merge pull request #979 from phil-davis/RELENG_2_1

Errors in graph calculations