Fixing some random decoding error handling