Made data optional in emit-event