Fixed objectAtIndex: method. Index validation was added.