bug in writer, not reader