Fixed an off by one error that was shifting the results of extendMatch