Fixed https://github.com/rails/rails/commit/fd7a2c639d82dcd02d6a226c80ee42afe3272ffb