fix null stats

This fixes the null stats count when there are multipages being written...previously the code did not clear the stats for a page after writePage is called
I finally found you.