Fixed some serial bugs