Fix bug in connectWifi method of connect callback trigger logic.