Fix results string builder.

moved the last bracket of an if statement.