Revised how document release to make sure no leaks