Fixed scope of abs_diff snippet