fixed issues with lt and gt comparisons.