cannot read properties of undefined reading handlechange