Improve request end event