Problem with closing application solved