Added brackets around an if statement