fix if condition error