Fix unclosed data reader