Fix onChange event being called