commitbeforeleaving