Fix error with wrong values in comparisments