fixed output string bug