Fixed the exit problem. Must fix thread management