Fixed issue with template selector