don't allow empty documents to be returned.
fix a minor lookup typo on receive trail.