database upgrade fix