join: fix upstream query