Protect against removal of header

And "close" now working.