Fixed JS issues