Prevent occasional errors when windows are deleted

This test is more accurate