fix bugs in retrieval measures