fix issue #1 socket to fd conversion