Fix migrate error