fix #1239

Please see [related issue](https://github.com/OctopusDeploy/Issues/issues/1239).