Fix for https://github.com/aws/aws-sdk-java/issues/246