migration bugs + added utility