restore prefix before going further downstream

upstream -> next

Revert "upstream -> next"

This reverts commit f08c2ffd8b34d66145ab1751e9140d1f5588e0f5.

fix upstream path

cleanup

more tests