fixed window leak bug