fix db exception