fixing the mongo retrieval issues