Jd fix scope conditional

Fix bad merge.

@dankurka you don't merge the PR in the right order