fix groupfixrelnames so it works from both php and python