Change comparisons to less than or greater than instead of less than or equal to or greater than or equal to.