Aplied patch reported on https://issues.apache.org/jira/browse/TS-2689