Might it be that you get a value overflow for the range of valid integer values?