GAIAEH-270 snippet logic fixed and improved