Bugfix in documentProvider try finally