fix snippet errors