Eliminate operator[] is deprecated warnings