Fixed the issue of wrong macro if path is given