Change Serial library and some bug fix and improvement