Add a missing 'then' from an if statemtn