Fixed missing 'then' in an if statement