handle per-state voodoo better.