Feature/safe disconnect