Making migration safer