Made it connect/disconnect more correctly.