Maybe you set pin 8 as an output with pinMode, but not pin 10?
Difficult to say though; you should post your code.