fixed bug with incorrect patterns dir path