fixed floating point issues