Update code for https://devcenter.heroku.com/changelog-items/347