fix writing status