corrected bug ondata event