Adding lowercased name to the end element check