Fix decode errors on windows 7