update onBeforeChange for Spec