Fix path issue when more than 2 directory levels