Bug fix for output string