My bug was an integer overflow problem!