-Fixed bug with closing a panel losing it's parent before the close event.