fix (hopefully) last major bug in JS compiler