Fixed rounding error

And removed some debugging stuff.