Added some debug code for working this goddamned index issue once and for all