Jaros fixes to the StateMap