Fixing Tests and migration