Fixed bug in string reading