some fixes for upgrade path