Fix bugs in Array and Vector classes.