Fixed JS errors.