Fix 2.1 branch for JAVA-393.
Merge pull request #214 from olim7t/fix_393

Fix 2.1 branch for JAVA-393.