leave-applications in templates