Fixed small bug on templates selection