Fix logical issue in writer