fix testWriteStmt(), testWriting()