added timeout in case we get stuck in loop waiting for start bit