bug fixing about writing list