fixing template bug #1975