solves issue U4-2356 when deleting templates