fixed trigger loading when installed as npm package and updated example