Fix parent window references.