Fixed some JS badness.