fix constructor by file descriptor