small bugfix concerning access to non-open database