Fix the Frame closed bug

Fix the bug, which the program is not existed when closed.