Merge "Use correct int for accessing snapshots in array" into main