Fix waiting for snapshot to finish