Fix incorrect casting of StringReader to String