copied over the current socketHandler
some reference fixes