fix some bugs, still have a bug with indexing that is exposed with loader_during.js