[#561] Fix error in production.rb

* Manually pull request #561 to the 3.5.x branch.