fix issue 243, JS error after setConnector called on connection