fix the bug in making list