Also emit end when we are done decoding