fixed issue related to https://jira.mongodb.org/browse/SERVER-14623

Here's the fix for https://jira.mongodb.org/browse/SERVER-14623