Added some tests for `Vector`.

* Made corresponding bug fixes.