Fix some page-write errors