Fixing possible locale issue with toLowerCase