fix for persisting window display after call to destroy