Further fix for internal database upgrade