fixes results sorting