fix db loading