Fix migration to avoid unwanted exception.