fix db name handling