Fix typo in beforeChange event implementation