Fix to check the number of remaining arguments correctly (check rnarg instead of narg, which is the number of arguments in total).