correct out of index error from poor matching