Stokes' theorem states that when $M$ is a compact oriented $m$-manifold with boundary, and $\omega$ is a $(m-1)$-form on $M$, we have
$$\int_{\partial M}\omega = \int_{M} d\omega.$$
This is confusing me for the following reason: It seems as if $\partial M$ were empty, i.e., if $M$ was a manifold without boundary, then we would have that the integral of $d \omega$ on the right is necessarily zero. But what if we took a manifold with boundary, and simply got rid of the boundary? This manifold would only differ from the original one on a set of measure zero, which should not affect the integration. This seems to imply that $\int_{M}d \omega$ is necessarily always zero, which of course can not be true. Where is the issue in my reasoning?