Fixed some comparisons and typos