Fixed an off by one error in extendMatch in the forward direction