Port r1712

Port fix for handling start and stop characters