fixed issue with disconnect not initialising the connection state