Fixed floating point bug