title: Jenkins Parameterized Remote Trigger Plugin Returning the Status of the Wrong Build
body: <p>I am using the <em>Parameterized Remote Trigger Plugin</em> in Jenkins to kick off a remote job, but it returns the status of a build besides the one that it kicked off. I have the trigger step blocking until the remote build is finished, so it is also causing it to return prematurely, since in some cases it returns the status of a build that has already finished.</p>
  
  <p>Since seeing this error, I have selected the option for the trigger step to wait until no builds are running. This should prevent the trigger step from returning the status of a build that is already running, which was part of the problem, but it has also happened when no builds were running.</p>
  
  <p>The console output below is from a build where the remote job was not currently running:</p>
  
  <pre><code>Triggering this remote job: &lt;job name&gt;
  Not checking if the remote job &lt;job name&gt; is building.
  Triggering remote job now.
  Remote Jenkins server returned empty response or invalid JSON - but we can still proceed with the remote build.
  Checking parameters of #55
  Remote Jenkins server returned empty response or invalid JSON - but we can still proceed with the remote build.
  Query failed.
  Checking parameters of #54
  Param &lt;param&gt; doesn't match!
  Checking parameters of #56
  Remote Jenkins server returned empty response or invalid JSON - but we can still proceed with the remote build.
  Query failed.
  Checking parameters of #53
  This job is build #[53] on the remote server.
  Blocking local job until remote job completes
  Remote build started!
  Remote build finished with status SUCCESS.
  </code></pre>
  
  <p>So my question is essentially how can I prevent this from happening? I haven't found anything online resembling this issue, so any insight would be much appreciated.</p>