"long" is not big enough to hold the value in case of large problems

Fixes #75 Thanks to Martin Maurer for this