Fixed “(index):3225 Uncaught ReferenceError: data is not defined at onchange” errors