Fixed int overflow
Merge pull request #22 from oscarpicas/master

Fixed int overflow
Merge branch 'master' into nestmod