fixed if statement