Fix crash on read timeout