adding bugfix for socket