Fixing hangs after junk data.