fixed rounding risk by comparing with EPSILON instead of 0