fixed window close callback