backport of ghrgroup.ch fixes