fix checking for snap index