added guard for logdb.queries NPE