Make the comparisons for state change >=/<=