fix some more js stuff
fix loading other modes for js files