Fixed bug in the DB class.