fixed #51 properly closing readers