Fixed to lookup valid template