Fix state/struct references.