Fixed bugs in argument passing.