Cheque integer overflow

In this PR is important only second commit. The new test from second commit does not pass because there is integer overflow.

Not sure what is correct behaviour / limits.