Fixed toShortString method