potential fix for templates bug