Bugfix pattern match