Convert ints to uints before doing boundary checks. Fixes #33.

That will make negative numbers very large and discard them as a result.