Changed to get from index to main