Fixed indexing bug in operator[] and resize.