Fixed an if statement