Fixed writer bug that was actually in the reader