fixed bug with languages and indexing (we should only index the first, but there was as typo)