Bug CON-94 fix

https://github.com/chandresh-pancholi/concourse/commit/c5ef91d4d7accf3c6df185d76ff57026b02db20e

Please review the code also.
I will add javadoc if everything looks good.