Added test for IndexError.