Fix busy looping and add connect channel