key look ahead bug fixed in restore