fix if-clause