Writer bug fix