Added missing "then" in "if" statement (take 2)