Fixed a bug with sage_db.