fixed stepCon to properly handle connection errors