Added a zero tolerance to account for rounding errors.