Fix templates view controller issue