Fixes compute_recall function

I will need to fix the history of the commits in that PR.