DB close behavior corrected