Galois representations and reduction mod $p$