Fix for state structure bug.