Fix migrate to work