make sure viewpointIndex is consistent