a small fix for the floating point problem