Fix for https://issues.apache.org/jira/browse/CB-4379