fixed two bugs that were preventing the finalize() function of the context manager from doing its cleaning up
license not comitted properly
Merge branch 'bob'