Fix target discovery for nightly
Merge pull request #143 from riccieri/patch-1

Fix target discovery for nightly