fix some db upgrade issues...