fix core-dump while reading PLAIN_ENCODING;
fix readNewPage to return page instead of the last one