Fixed a bug with the match pattern for the cwd.