floating point bugfix