fixed some socket issues - still some outstanding