Fix doctest and input data decoding