Fixed bug in hdlcprot and added debugging