floating points bugfixes