safer tail query