fix prepare match