fix db concurrent bug