bug fix for db upgrade on clean boot