Fix numerical comparison issue in unit tests.