Fixed bug with writer_reader