Bug fix for identity migrations