fixed broken DB as_object() method; closes #334