Fixing gid_type locking issues