Fix settings and migrations