m17

Change connect and disconnect sequence