I am probably missing something obvious, but still...

Consider an oriented Riemannian $n$-dimensional vector bundle $\pi: E\rightarrow X$ over compact manifold $X$ with $\omega_2(E)=0$ so it has spin structures. Let $P_{SO}(E)$ denote the associated principal $SO_n$ frame bundle. We would like to count the number of different spin structures over $E$.

$1)$ From the fibration $SO_n\xrightarrow{i}P_{SO}(E)\xrightarrow{\pi}X$ we have an exact sequence $0\rightarrow H^1(X, \mathbb{Z}_2)\xrightarrow{{\pi}^*}H^1(P_{SO}(E), \mathbb{Z}_2)\xrightarrow{i^*}H^1(SO_n , \mathbb{Z}_2)$ from which we see that the number of different spin structures over $E$ is $H^1(X, \mathbb{Z}_2)$.

$2)$ On the other hand the short exact sequence $0\rightarrow\mathbb{Z}_2\rightarrow Spin_n\rightarrow SO_n\rightarrow 1$ gives an exact sequence $H^0(X, SO_n)\xrightarrow{\delta} H^1(X, \mathbb{Z}_2)\rightarrow H^1(X, Spin_n)\rightarrow H^1(X, SO_n)$ from which the number of different spin-structures over $E$ is $H^1(X , \mathbb{Z}_2)/\delta(H^0(X, SO_n))$.

So why do we have different answers for the same object?