fix some little bugs in serial