fixed bug in argument passing