minor improvement for migrate