Changed if statement to check against a string rather than a bool