BUGFIX template selection not working