Ensure reader is closed

Fixes bug where it might roll back due to this.