added more possibilities to close the application