actually fixed the javascript index maps