Fixed bugs related to migration from 2.0.4 to 2.1.0