IndG should be storing integers, not doubles. Really, it could be using unsigned int's, but for now leave it as is.