Fix db selection