fixes results page so that it returns correct data