Fix bug with state updating.
Merge branch 'develop' of hitc14:Minerva/python/minerva-etl into develop