Tmichelet/ana 574/migration bug

to test 
   make test TESTS=test_state.TestState
   make test TESTS=test_migration.TestMigration