DB migration fixes
Overall fixes