fixed missing then