Fix db choosing regression.