migration and oth. minor fixes