fixed if statement line problems