fixes odd bug where js files loaded 2x