Fix missing brackets around an if statement