Forgot to check for integer overflow, the result couldn't fit in a int32 and was messing everything up, was mad with myself and just in64()'d the entire program because I had no interest in it anymore. Works just fine but it's mangled.