cleanup in return values of doUpgrade and doUpdate