Added debugging on index