Fixed minor JS issues.