handle notfound better rather than resulting in NPE