fix condition test when close to 0