fixed some bugs

including 10 newly added sys calls.