fixed window closed problem...