fix syscall write