Fix bug in writer test.