fixed comparison errors