fixing dropped byte problem