Fixed floating point error between debug and release modes.  Caused hermit many issues.