exit when finised decoding