Add debug to make sure indexes are correct