Fix incorrect error description in do_commit