I have a configuration where the last step in the configuration runs a script that executes REST API commands to pin the current build. In the script, I use %teamcity.serverUrl% and %system.teamcity.buildType.id% to get a list of all the builds in the configuration. Then I unpin all those builds. Then I utilize %teamcity.build.id% to pin the current build. I get an error because it seems the build doesn't exist (in the DB?) yet and therefore can't be pinned. Is there a proper way to do this or am I just doing something wrong? Thanks!