Fixed bug with format and read of serial