fix the bug, but still a memory leak