add text to index, fix js error