fix debugging connect trying to handle errors