Fix lookup failures; return 404 when item is not in db