Fix bug in 'matchTarget' reported by Felicia Chen