Do not access s->gb directly in functions that have a local copy of that