Fixes bug where syscalls were completed twice