added window close binding