bug in match fixed