TPGR: fix gr segfault