fix db/dbw detection