Fixed JS errors 1