fix crash in read ends container