Added closing state to leave.