fixed if condition