feature #2798: Fix template selector