fixed error on close

removed the old DB calls on close