Fixed to properly close a reader.
Merge pull request #122 from myui/hotfixes

Fixed to properly close a reader.