remove unnecessary window detach event