fixed wrong index parsing