removed unnecessary db flush