This fixes snapshot so that it is not run multiple times.