Fixing connection issue, and returning offset.