type(double) indexing bug fix