Fixed bug can not exit