psi nested groups: fixed segmentation fault on exit