fix getArgs function