socket server fixed
merge with jlee