fix path issues in Match portion of script