Bug fixed in doc and snippet retrieval