corrected snippet extraction