fixed the logic for taking a snapshot incrementally