Fixed bug in getDataAsString.