Fix wrong comparisons