Minor bugs regarding migrations