fix possible migrations ordering problem