Fixed comparison of double type variable.