Fixed an if statement broken in the last commit