Fix a bug with view migration