Several fixes to the kibana2 daemon