Fixing bug in arg parsing