Fixed comparsion mistakes