Fix exception closing container window