I added this fix the other day
https://github.com/discourse/discourse/commit/ec0b4b2acc7d9c72740c542130f46b7946b37a8a