fix match elements