serial bug fix