Fixing issue in db.rb#close