cleanup after upgrade