Closing of applications