added missing semicolons to javascript code