fix infinite loop when handling syscalls.
Merge pull request #10 from baris/master

Fix inf. loop when handling syscall