fixed floating point issues
big fixes