Tweaked ser.write() statement