Improved program close management