Fixed a bug for multi-doc introduced in the previous checkin