bugfix on match