Added evento to close application