Fixed floating point issues