Automatically close old windows