Fix window layering after exit