Fixed bugs found when testing in Firefox, mostly typos.