WPM db upgrade fix