bugfix in afterSend event.