Put on top the updateSerial function because of a weird behaviour