Trouble understanding hamilton 1996 specification testing in MS I'm an undergraduate student and I'm trying to code the specification testing for Markov-switching model in R, based on the article "Specification Testing in Markov-Switching time series models" Hamilton 1996.

More specifically, I don't understand equation 3.12, or maybe I have misunderstood something. 

In equation 3.12 you have a term like this 

$$ = p_{ij}^{-1} p(s_{t}=j,s_{t-1}=i|\Omega_{t})$$

But since 

$$ p(s_{t}=j,s_{t-1}=i|\Omega_{t}) = p_{ij} p(s_{t-1}=i|\Omega_{t})$$

then 

$$= p_{ij}^{-1}p_{ij} p(s_{t-1}=i|\Omega_{t}) = p(s_{t-1}=i|\Omega_{t})$$

Is this ok?
In my question, I rewrite the joint probability as the product of the conditionals probabilities but I wrongly implemented the markov assumption of this model. The markov assumption is:
$$
p(s_{t}=j|s_{t-1}=i,\Omega_{t-1})=p(s_{t}=j|s_{t-1}=i)=p_{ij}
$$
But, when conditioned to information available at date t
$$
p(s_{t}=j|s_{t-1}=i,\Omega_{t})\neq p(s_{t}=j|s_{t-1}=i)=p_{ij}
$$
Meaning that

$$
p(s_{t}=j,s_{t-1}=i|\Omega_{t})\neq p(s_{t}=j|s_{t-1}=i)p(s_{t-1}=i|\Omega_{t})
$$