Fixes issue when multiple simultaneous requests are sent.

Fix for [CB-6763](https://issues.apache.org/jira/browse/CB-6763)