fix typo in results writing