Bugfix: implementing Siri's review comment.

Change-Id: I87dfd38c5ac9df20aaa2ed77638137a3521381d9
Reviewed-on: http://review.couchbase.org/39151
Reviewed-by: John Liang <johliang00@gmail.com>
Reviewed-by: Pratap Chakravarthy <prataprc@couchbase.com>
Tested-by: Pratap Chakravarthy <prataprc@couchbase.com>