fixed an if statement