fixed if-clause