Commit before cleaning up.