syscall bug fixes