Removed an unnecessary toLowerCase()

This change happens to also resolve an issue with one of the
test cases.