Fix clicking exit does not to close whole program