missing then in if statement