Fixed bug with state map not being initialised correctly