Added watchdog timer and fixed a bug that occurred when dest header was at end of queue