fixed a migrate bug