fixed bug in event sending, now work on server side