index code fix