Error on first match

Because of variable not correctly initialized