Fixed 'bad state' error preventing disconnection

App previously always thought it was disconnected, and thus the action
butten would always be 'connect' - even when connected.
Turns out to be a booboo in reading parameters from the Message Handler