added notification for window close