fix and update code related to previous migrations