Closing panes is now less buggy