Added proper support for negative indices in __getitem__.