Fix potential issue with float round-up error