Fix unit tests
Fix migration