Fixed a few minor bugs to get OSX working with new serial driver