onConnected fix