fix bug in argument parsing