#37 - backport to ES 0.90.5 and java 1.6