fix typo in write