Fix Close button bug

Fixes issue when close button (red) was used and the window wouldn't come back.