Fix types in serial driver