Fix matching token

closes #1362