small fix so submission loop exits on success