fixes db upgrade step to check for correct previous step