javascript: fix semicolons