fix to avoid https://issues.apache.org/jira/browse/HADOOP-10820