Fixed bug in syscall handler argument checking