Fix downcase

Fix issue when using devise(?) where mutating downcase raises an exception.

Thanks @thibaudgg!