Applying patch https://issues.apache.org/bugzilla/attachment.cgi?id=29103&action=diff