pattern fixing