Fixed floating point conversions

fixes #2 (github)