Fixes https://github.com/HearthStats/hearthstats/issues/252

https://www.honeybadger.io/inspector/p/35534/5961386