corrects patch

re-ordering connection state