fixing typo on valuechanged function