Fixed int overflow prob described in piazza post 54.

Problem affected some acceptance tests with high value input
ranges.