Fixed bug with DB.