fix bug in arg parsing