fix serial bugs

...and so on