Change baudrate computation to use setbaud.
Fix integer size bug