Fix crash due to decoding errors