Small fixes in migration and linux compatibility