could be these string to number comparisons causing it
scripted update of code from master at c4c70e3 could be these string to number comparisons causing it