fix minor bug in rough_decode