final fixes for upgrade