fixed floating point errors