Added back ability to close document