fixed some errors in the SerialDriver class