Fixing an NPE in the reader.