Fixes for using both writer and reader