Fix missing then statement