Fixed the write