Fix task manager app exit routine