fixed some issues with the migrations