fix timing issue of sendevent