fix bug with missing GIDs