Fixed bug Application Exit