sanitize gID
Merge pull request #1773 from Remo/sanitize-gid

sanitize gID