fix loacal db leak