Fixed `gri` function so that default values work.

- Original implementation assumed too much regarding customized value
  (i.e. was always present due to incorrect setup).