Fixed error where duplicate template entries was found