Fix indexing for languages with length of 3 or more