fix crash caused by reader failure