Vector bundles and elementry transformation Let $E$ be a vector bundle of rank $r$ and let $\phi:E\rightarrow \mathbb C_p$ non vanishing map to the skyscraper sheaf. 
consider the kernel $F$ of this sheaf which is a sub-bundle of $E$, every fiber of $F$ has a rank $r$, just that over $p$ which has rank $r-1$. 
So why we say that $F$ has a rank $r$?? 
thanks 
 A: Let $X$ be a smooth curve, $E$ a vector bundle on $X$ of rank $r$ and  $\mathcal E$  the locally free sheaf of sections of  $E$.
Suppose you have  an exact sequence of sheaves $ 0\to \mathcal F\to \mathcal E \to \mathbb C_p \to 0$ with $\mathbb C_p$ the skyscraper sheaf concentrated at $p$ with stalk $\mathbb C$ .  
Is $\mathcal F$ a locally free sheaf of  rank $r$, thus corresponding to a vector bundle $F$ of rank $r$ ?  Yes!
Is $\mathcal F$ a subsheaf of $\mathcal E$ ? Yes!
Is $F$ a subbundle of $E$ ? NO ! 
And therein lies the confusion: the morphism of stalks  $\mathcal F_p\to \mathcal E_p$ is injective but tensoring with $\mathbb C$ is not an exact functor so that the resulting morphism of fibers  $  \mathcal F_p\otimes _{\mathcal O_{X_p}}\mathbb C=F(p)\to \mathcal E_p   \otimes _{\mathcal O_{X_p}} \mathbb C=E(p)$ is not injective.
In other words $F$ is not a subbundle of $E$. 
Toy example
Just think of the ideal $\mathcal F=\mathcal I\subset \mathcal E=\mathcal O_X$ of functions vanishing at $p$ and stare at the exact sequence of sheaves $$   0\to \mathcal I\to \mathcal O_X \to \mathbb C_p \to 0       $$
A: If you know that $F$ is a vector bundle, its rank may only be the rank of $F_{|U}$ where $U$ is the open set $U=X\setminus p$. Hence it has rank $r$, even at $p$ !! Here is an example of this situation.
Consider $X=\mathbb{P}^1$ and let $p$ be any point. Let $E=X\times\mathbb{C}$ be the trivial vector bundle so that its sheaf of section is $\mathcal{O}_X$ and $\mathcal{O}_X\rightarrow\mathbb{C}_p$ is the evaluation map $f\mapsto f(p)$. It is a surjective map of sheaves and its kernel $I_p$ is isomorphic to $\mathcal{O}_X(-1)$, and in particular is locally free of rank 1.
While this is true that the sequence of stalks (not fibers)
$$ 0 \rightarrow (I_p)_p\rightarrow \mathcal{O}_{X,p}\rightarrow \mathbb{C}\rightarrow 0$$
is exact, it does not mean that the sequence of fibers is. That is the fiber of $I_p$ at $p$ is not the kernel of the map between the fibers. Hence, the fiber of $I_p$ is not of dimension $r-1$ ($r=1$ in our example).
Recall that if $f:E\rightarrow X$ is a vector bundle over $X$ with sheaf of section $\mathcal{E}$, the fiber at $p$ is $f^{-1}(p)$ and this is not the same thing as the stalk $\mathcal{E}_p$. Algebraically, you get the fiber by considering the tensor product $\mathcal{E}\otimes_{\mathcal{O}_X}\mathbb{C}_p$. The algebraic reason why fibers do not commute with kernel is that $\mathbb{C}_p$ is not a flat $\mathcal{O}_X$-module.
