Fix for doc id fetch