Fixed some minor JavaScript issues.