moved option parsing of rg fields to a correct place