Fixed writer error