On character sums and power residues