minor changes to text socket