fix badmatch