Fixing bug where daemon crashed if box was unplugged.