fix bugs on returning value about syscalls