some fixes for kibana 4 and es 1.4