Fixed memory leak in class Vector.
Fixed bug on lastSwapIndex in class Clause.