Johan Ymerson - 2014-03-02

I also ran into this problem. It is caused by a "long int" overflow in the percent calculation.
I have attached a patch that fixes the issue.