Fix bug with snapshot index