No. 19 Stanford sloppy in 24-17 win over Washington State