Resolved invalid reference error in index