Fix for #6012 - Use wrapper for substr() in ProgressBar

@tburschka found the issue.