Use extend instead of append to fix list problem.