Correct the submissions query in snapshot generation