[Hotfix] Move window deletions to their proper places

Fixes compilation error.