having done ... by mistake; having messed up ...
to finish; to stop; to end; to put an end to; to bring to a close