fix db patch