How to Fix Auto Close Application