fixed a bug that was screwing up the results

I need the top hit for each query, but the script was giving me the query for each top hit