Fixed problem with __exit__.