cleanup references to old databases