This should fix it
https://github.com/discourse/discourse/commit/0a708ba0646524f760e8f950e34ac33b4ad1ef5b