Fixed bug in db.save/db.remove.