Introduce a Decoder for handling IllegalReferenceCountException instead of having repeatable code here #470