fix calling of onconnect/onreconnect from my stupid boolean logic