Better panel closing