Corrected a bug in db.objects