Make end() use submit()