made log reverse more accurate by using upstream reference