fixed error in argument parsing logic