Fix prettyListString() function.